From 8dd7ae38f90a47282d29d0e5fa9da4e994248a49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Wed, 20 Oct 2010 18:37:59 +0200 Subject: [PATCH] gtkfilechooserentry: Use accessor functions to access GtkEntry --- gtk/gtkfilechooserentry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 3e5420a947..009d842f37 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -998,13 +998,16 @@ get_entry_cursor_x (GtkFileChooserEntry *chooser_entry, gint layout_x, layout_y; gint layout_index; PangoRectangle strong_pos; + gint start_pos, end_pos; layout = gtk_entry_get_layout (GTK_ENTRY (chooser_entry)); gtk_entry_get_layout_offsets (GTK_ENTRY (chooser_entry), &layout_x, &layout_y); + gtk_editable_get_selection_bounds (GTK_EDITABLE (chooser_entry), &start_pos, &end_pos); layout_index = gtk_entry_text_index_to_layout_index (GTK_ENTRY (chooser_entry), - GTK_ENTRY (chooser_entry)->current_pos); + end_pos); + pango_layout_get_cursor_pos (layout, layout_index, &strong_pos, NULL); -- 2.30.2